<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://unpkg.com/vue@next"></script>
    <title>Document</title>
</head>

<body>
    <div id="counter">
        Message: {{ hello }}
        Counter: {{ counter }}
    </div>

    <div id="bind-attribute">
        <span v-bind:title="message">   <!--指令 v-bind:attribute--> 
          鼠标悬停几秒钟查看此处动态绑定的提示信息！
        </span>
    </div>

    <script type="text/javascript">
        const Counter = {
            data() {
                return {
                    counter: 0,
                    hello: "Hello World!"
                }
            },
            mounted() {
                setInterval(() => {
                        this.counter++
                }, 1000)
            }
        }

        Vue.createApp(Counter).mount('#counter')

        const AttributeBinding = {
            data() {
                return {
                    message: "You loaded this page on " + new Date().toLocaleDateString()
                }
            }
        }

        Vue.createApp(AttributeBinding).mount("#bind-attribute")
    </script>
</body>

</html>

// <!DOCTYPE html>
// <html lang="en">
// <head>
//     <meta charset="UTF-8">
//     <meta http-equiv="X-UA-Compatible" content="IE=edge">
//     <meta name="viewport" content="width=device-width, initial-scale=1.0">
//     <script src="https://unpkg.com/vue@next"></script>

//     <title>Document</title>
// </head>


// <body>
//     <script type="text/javascript">
//     </script>

// </body>
// </html>